<?php
include_once("Event.class.php");

class EventManager
{
	var $events = array();

	function add($type, $do)
	{
		if (!isset($this->events[$type]))
		{
			$this->events[$type] = new Event($type, $do);
		} else {
			$this->events[$type] = new Event($type, $this->events[$type]->do . $do);
		}

	}

	function getEvents()
	{
		$ret = "";

		if (count($this->events) > 0)
		{
			foreach($this->events as $event)
			{
				$ret .= $event->getEvent();
			}
		}

		return $ret;
	}
}

?>